﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LevelEditor
{
    public class AnimationTile:Tile
    {
        public int xOff;
        public int yOff;
        public int width;
        public int height;
        public int interval;
        public int frames;

        /// <summary>
        /// Creates a tile that holds a sprite sheet and information for it
        /// </summary>
        /// <param name="nm">Tile name</param>
        /// <param name="collide">Whether it is collidable or not</param>
        /// <param name="type">The type of tile it is</param>
        /// <param name="locX">X location</param>
        /// <param name="locY">Y location</param>
        /// <param name="xOffset">The x direction offset on the sprite sheet</param>
        /// <param name="yOffset">The y direction offset on the sprite sheet</param>
        /// <param name="spriteWidth">The width of each sprite on the sprite sheet</param>
        /// <param name="spriteHeight">The height of each sprite on the sprite sheet</param>
        /// <param name="spriteInterval">The interval between each sprite</param>
        /// <param name="totFrames">The total number of frames on the sheet</param>
        public AnimationTile(String nm, bool collide, bool push, char type, int locX, int locY, int xOffset, int yOffset, int spriteWidth, int spriteHeight, int spriteInterval, int totFrames)
            : base(nm, collide, push, type, locX, locY)
        {
            xOff = xOffset;
            yOff = yOffset;
            width = spriteWidth;
            height = spriteHeight;
            interval = spriteInterval;
            frames = totFrames;
        }
    }
}
